package com.ttms.web.manage;

import com.ttms.pojo.Info;
import com.ttms.pojo.Page;
import com.ttms.pojo.Studio;
import com.ttms.service.TicketService;
import com.ttms.service.impl.TicketServiceImpl;
import com.ttms.utils.WebUtils;
import com.ttms.web.common.BaseServlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class TicketServlet extends BaseServlet {
    private TicketService ticketService = new TicketServiceImpl();
    protected void page(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

//        影片id	影片名称	票价	销售额	上座率	总票房
//        int pageNo = WebUtils.parseInt(req.getParameter("pageNo"), 1);
//        int pageSize = WebUtils.parseInt(req.getParameter("pageSize"), Page.PAGE_SIZE);
        List<Info> infos = ticketService.queryInfos();
        req.setAttribute("infos", infos);
        req.getRequestDispatcher("/front-end/views/manage/ticketmanage.jsp").forward(req,resp);
    }




}
